{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang strategy_edit:admin}-{echo lang($rule['event_code'],'event')}</h3>
	</div>
	<div class="setform">
		<form class="pzform" method="post" action="{url admin/credit?type=strategy&act=save&rid=$rule['event_id']}" id="addform">
			<div class="formgroup">
				<label class="formlabel">{lang strategy_cycle:admin}:</label>
				<div class="formcontrol">
					<select name="cycletype" id="cycletype">
						<option value="onetime"  {if $rule['cycletype']=='onetime'}selected{/if}>{lang onetime:admin}</option> 
						<option value="everyday"  {if $rule['cycletype']=='everyday'}selected{/if}>{lang everyday:admin}</option> 
						<option value="notimelimit"  {if $rule['cycletype']=='notimelimit'}selected{/if}>{lang notimelimit:admin}</option> 
					</select>
				</div>
				<span class="formhelp">{lang group_system:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang strategy_rewardnum:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="rewardnum" id="rewardnum" value="$rule['rewardnum']"/>
				</div>
				<span class="formhelp">{lang strategy_rewardnu_tip:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">ext_credits_1 ($setting['ext_credits_1']):</label>
				<div class="formcontrol">
					<input type="text" name="ext_credits_1" value="$rule['ext_credits_1']"/>
				</div>
				<span class="formhelp">$setting['ext_credits_1']</span>
			</div>
			<div class="formgroup">
				<label class="formlabel">ext_credits_2 ($setting['ext_credits_2']):</label>
				<div class="formcontrol">
					<input type="text" name="ext_credits_2" value="$rule['ext_credits_2']"/>
				</div>
				<span class="formhelp">$setting['ext_credits_2']</span>
			</div>
			<div class="formgroup">
				<label class="formlabel">ext_credits_3 ($setting['ext_credits_3']):</label>
				<div class="formcontrol">
					<input type="text" name="ext_credits_3" value="$rule['ext_credits_3']"/>
				</div>
				<span class="formhelp">$setting['ext_credits_3']</span>
			</div>
			
			<div class="formbuttons">
				<button type="submit" class="btn btn-primary">{lang save:admin}</button>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
	$('#cycletype').change(function (){
		if($(this).val()=='onetime'){
			$("#rewardnum").val(1);
			$("#rewardnum").attr('disabled','disabled');
		}else{
			$("#rewardnum").removeAttr('disabled');
		}
	});
});
</script>
{template common/contentfooter}